<?php

use Biz\model\salesRebate\SalesCoupon as mSalesCoupon;

class AddJoinAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_REALNAME;

    public function main()
    {
        $uid = $this->uid;

        if ($result = mSalesCoupon::updatebyWhere(['status' => mSalesCoupon::STATUS_OPEN], ['uid' => $uid])) {
            $this->setSuccess($result);
        } else {
            throw new \Exception('系统忙，请稍后再试');
        }


    }
}